var div = $("div");
div.html("&lt;b&gt;test&lt;/b&gt;");
var pass = true;
for ( var i = 0; i &lt; div.size(); i++ ) {
  if ( div.get(i).childNodes.length == 0 ) pass = false;
}
ok( pass, "Set HTML" );